<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>

<html>
<head>
    <title>登录页</title>
    <%--echart线图、柱状图、饼图等各种图型库 cdn--%>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
    <%--jquery cdn--%>
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>
</head>
<body>

<form action="/list.do">
    订单编号<input name="orderNum"><br>
    账号编号<input name="userNum"><br>
    手机号<input name="phone"><br>
    产品Id<input name="productNum"><br>
    产品类型<select name="productTypeId">
        <option value="">请选择</option>
        <c:forEach items="${productTypeList}" var="p">
            <option value="${p.id}">${p.name}</option>
        </c:forEach>
    </select><br>
    币种类型<select name="currencyId">
        <option value="">请选择</option>
        <c:forEach items="${currencyTypeList}" var="c">
            <option value="${c.id}">${c.name}</option>
        </c:forEach>
    </select><br>
    <input type="submit" value="查询">


    <table>
        <tr>
            <td>id</td>
            <td>订单编号</td>
            <td>用户编号</td>
            <td>用户手机号</td>
            <td>产品ID</td>
            <td>产品类型</td>
            <td>币种</td>
            <td>持仓余额</td>
        </tr>
        <c:forEach items="${pageInfo.list}" var="order">
            <tr>
                <td>${order.id}</td>
                <td>${order.orderNum}</td>
                <td>${order.userNum}</td>
                <td>${order.phone}</td>
                <td>${order.productNum}</td>
                <td>${order.productTypeName}</td>
                <td>${order.currencyName}</td>
                <td>${order.balance}</td>
            </tr>
        </c:forEach>
        <tr>
            <td>
                <button name="pageNum" value="${pageInfo.firstPage}">首页</button>
            </td>
            <td>
                <button name="pageNum" value="${pageInfo.prePage}">上页</button>
            </td>
            <td>
                <button name="pageNum" value="${pageInfo.nextPage}">下页</button>
            </td>
            <td>
                <button name="pageNum" value="${pageInfo.pages}">尾页</button>
            </td>
        </tr>
    </table>
</form>

</body>
</html>